<%@page import="cn.sendto.mapper.IRowMapper"%>
<%@page import ="cn.sendto.dbhelper.*" %>

<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@include file="getSession.jsp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>删除班级信息</title>
</head>
<body>
<%
   request.setCharacterEncoding("UTF-8");
   //response.setCharacterEncoding("UTF-8");
   String id = request.getParameter("id");
    
   //实例化操作数据库的类
   DBHelper helper =new DBHelper();
   
   //定义SQL语句
   String sql= "delete from classinfo where classid = ?";
   
   int rows = helper.executeSQL(sql, id);
   
   if(rows>0){
	   request.setAttribute("info", "删除成功！");
   }
   else{
	   request.setAttribute("info", "删除失败！");
   }
   request.getRequestDispatcher("class_list.jsp").forward(request, response);
%>
</body>
</html>